.t-layout {
  background-color: #8a8a8a;
  display: initial;
}
.chat-page-container {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  width: 100%;
  padding: 20px 0;
  max-width: 1000px;

  &__wrapper {
    flex: 1;
    display: flex;
    position: relative;
  }
}

.chat-main-content {
  flex: 1;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-sizing: border-box;
  height: calc(100vh - 200px);
  overflow: auto;
  scroll-behavior: smooth;
  overflow-x: hidden;
  padding: 0 25px 50px;
  scrollbar-width: none;
}

.chat-message:last-child {
  margin-bottom: 20px;
}

.chat-message-icon {
  display: flex;
  margin-left: 35px;
  font-size: 16px;
  cursor: pointer;

  :hover {
    background: #fafafa;
  }

  .t-icon {
    margin-right: 10px;
  }
}

.chat-message-content {
  display: flex;
  flex-direction: column;
  max-width: 70%;
}

.chat-message-wrapper {
  display: flex;
  align-items: flex-start;
  position: relative;
  box-sizing: border-box;
  text-align: left;
  padding: 12px 16px;
  border-radius: 6px;
}

.chat-message-wrapper.user {
  flex-direction: row-reverse;
  width: auto;
  .chat-message-content {
    margin: 12px;
    max-height: 500px;
    overflow-y: auto;
    .chat-message-text {
      background-color: #95ec69;
      border-radius: 12px 0 12px 12px;
    }
  }
}

.chat-message-wrapper.bot,
.chat-message-wrapper.success {
  justify-content: flex-start;
  width: 1000px;
  .chat-message-content {
    margin: 12px;
    min-width: 70%;
    .chat-message-text {
      background-color: #fafafa;
      border: 1px solid #eee;
      border-radius: 0 12px 12px 12px;
    }
  }
}

.chat-message-text {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.chat-page-footer {
  flex-shrink: 0;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
  height: 100px;
  padding: 20px 20px 0 20px;
  border-radius: 8px;

  .chat-input-box {
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-content: center;
    justify-content: space-between;
    border: 1px solid #eee;
    box-shadow: 0 4px 6px 0 #0000000a;
    border-radius: 8px;
    min-height: 82px;
    max-height: 140px;
    padding: 20px 0 20px 20px;

    .chat-input-container {
      display: flex;
      align-items: center;
      overflow-y: auto;
      min-height: 30px;
      max-height: 100px;
      font-size: 14px;
      color: #000000;
      box-sizing: border-box;
      word-break: break-all;
      position: relative;
      align-content: center;
      line-height: 40px;
      width: calc(100% - 135px);
      text-align: left;
      direction: ltr;
      outline: none;
      margin-right: 10px;
      scrollbar-width: none;
      scroll-behavior: smooth;
    }

    .chat-input-button {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
    }
  }
}


/* 自定义代码块样式 */
pre {
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1rem 0;
  background: #2d2d2d;
}

.hljs {
  background: transparent !important;
  padding: 0;
}

code {
  word-break: break-word;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  span {
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
  }
}

pre code .line-number {
  position: absolute;
  left: 0;
  padding-right: 1em;
  text-align: right;
  color: #666;
  user-select: none;
}